//app.js
App({
  onLaunch: function () {
    try {
      // wx.clearStorageSync()
      // 获取设备信息
      const res = wx.getSystemInfoSync()
      const info = wx.getMenuButtonBoundingClientRect()
      const userInfo = wx.getStorageSync('userInfo')
      this.globalData.systemInfo = res
      this.globalData.rightBarInfo = info
      if (userInfo) {
        this.globalData.userInfo = userInfo
      }
    } catch (e) {
      console.log(e)
    }
  },
  globalData: {
    systemInfo: {},
    rightBarInfo: {},
    userInfo: {}
  }
})
